package cosc617_blackteam;

/**
 * @author Laura
 * Command to get the statistics of the system in the given
 * infoaggregator
 */
public class CmdGetStatistics implements I_Command {
	private InfoAggregator infoagg;
	
	public CmdGetStatistics(InfoAggregator infoagg){
		this.infoagg =  infoagg;
	}
	
	/* (non-Javadoc)
	 * @see cosc617_blackteam.I_Command#execute()
	 * Returns a string representing the statistics of the system
	 * in the infoaggregator
	 */
	@Override
	public String execute() {
		return "Number of customers served: "+infoagg.getNumCustomersServed() + "\n"+
				"Number of items ordered: " +infoagg.getNumItemsOrdered();
	}

}
